package com.test.kotlin04

fun setTest(){
    val set:Set<String> = setOf("Jason","jack","jacky")
    println(set.elementAt(2))
}

fun mutalbeSetTest(){
    val mutableSet = mutableSetOf("Jason","jack","jacky")
    println(mutableSet)
}

fun list2Set(){
    val list:List<String> = listOf("Jason","jack","jacky","Jason","jack","jacky").toSet().toList()
    println(list)

}

fun distinctTest(){
    val list:List<String> = listOf("Jason","jack","jacky","Jason","jack","jacky").distinct()
    println(list)
}

fun main(){
    setTest()
    mutalbeSetTest()
    list2Set()
    distinctTest()
}